package cn.bluedot.service.impl;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bluedot.dao.VaccinationRecordDao;
import cn.bluedot.model.VaccinationRecordView;
import cn.bluedot.service.VaccinationRecordService;
/**
 * 疫苗记录service实现类
 * @author hxp
 * 2019年4月21日 下午7:45:41
 */
@Service
public class VaccinationRecordServiceImpl implements VaccinationRecordService {
    @Autowired
    private VaccinationRecordDao  vaccinationRecordDao;
    
    @SuppressWarnings("unchecked")
    @Override
    public Set<VaccinationRecordView> showRecord() {
        Set<VaccinationRecordView> set = vaccinationRecordDao.selectAllVaccinationRecord();
        return set;
    }

    @Override
    public void updateVaccinationOneRecord(String recordId, String state) {
        Map<String,String> map = new HashMap<>();
        map.put("recordId", recordId);
        map.put("state", state);
        vaccinationRecordDao.updateVaccinationOneRecord(map); 
    }

}
